package androidx.recyclerview.widget;

import android.view.View;
import android.view.ViewGroup.LayoutParams;
import androidx.recyclerview.widget.RecyclerView.s;
import o.mg.c;

class RecyclerView$2 implements c {
    final /* synthetic */ RecyclerView ॱ;

    RecyclerView$2(RecyclerView recyclerView) {
        this.ॱ = recyclerView;
    }

    public int ˏ() {
        return this.ॱ.getChildCount();
    }

    public void ˏ(View view, int i) {
        this.ॱ.addView(view, i);
        this.ॱ.ͺ(view);
    }

    public int ˋ(View view) {
        return this.ॱ.indexOfChild(view);
    }

    public void ˎ(int i) {
        View childAt = this.ॱ.getChildAt(i);
        if (childAt != null) {
            this.ॱ.ˋॱ(childAt);
            childAt.clearAnimation();
        }
        this.ॱ.removeViewAt(i);
    }

    public View ˋ(int i) {
        return this.ॱ.getChildAt(i);
    }

    public void ˎ() {
        int ˏ = ˏ();
        for (int i = 0; i < ˏ; i++) {
            View ˋ = ˋ(i);
            this.ॱ.ˋॱ(ˋ);
            ˋ.clearAnimation();
        }
        this.ॱ.removeAllViews();
    }

    public s ˊ(View view) {
        return RecyclerView.ˏ(view);
    }

    public void ˏ(View view, int i, LayoutParams layoutParams) {
        s ˏ = RecyclerView.ˏ(view);
        if (ˏ != null) {
            if (ˏ.ॱˋ() || ˏ.G_()) {
                ˏ.ˊॱ();
            } else {
                throw new IllegalArgumentException("Called attach on a child which is not detached: " + ˏ + this.ॱ.ˎ());
            }
        }
        RecyclerView.ˊ(this.ॱ, view, i, layoutParams);
    }

    public void ॱ(int i) {
        View ˋ = ˋ(i);
        if (ˋ != null) {
            s ˏ = RecyclerView.ˏ(ˋ);
            if (ˏ != null) {
                if (!ˏ.ॱˋ() || ˏ.G_()) {
                    ˏ.ˎ(256);
                } else {
                    throw new IllegalArgumentException("called detach on an already detached child " + ˏ + this.ॱ.ˎ());
                }
            }
        }
        RecyclerView.ˊ(this.ॱ, i);
    }

    public void ˏ(View view) {
        s ˏ = RecyclerView.ˏ(view);
        if (ˏ != null) {
            ˏ.ˊ(this.ॱ);
        }
    }

    public void ˎ(View view) {
        s ˏ = RecyclerView.ˏ(view);
        if (ˏ != null) {
            ˏ.ॱ(this.ॱ);
        }
    }
}
